//
//  ATScript.h
//  AutomationTool
//
//  Created by Laurie Marmon on 2/26/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class ATScriptStep;

typedef enum {
    ATScriptStepTypeSetup,
    ATScriptStepTypeNormal,
    ATScriptStepTypeReset
} ATScriptStepType;

@interface ATScript : NSObject <NSCoding>

@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *userDescription;
@property (nonatomic, assign) BOOL isArchived; //ability to be used in other scripts
@property (nonatomic, readonly) NSArray *scriptSteps;
@property (nonatomic, readonly) NSString *displayString;

- (void)insertScriptStep:(ATScriptStep *)scriptStep atIndex:(NSUInteger)index ofType:(ATScriptStepType)type;
- (void)removeScriptStep:(ATScriptStep *)scriptStep ofType:(ATScriptStepType)type;
- (void)removeAllScriptStepsofType:(ATScriptStepType)type;
- (void)updateScriptStep:(ATScriptStep *)scriptStep ofType:(ATScriptStepType)type;
- (void)reorderScriptStep:(ATScriptStep *)scriptStep atIndex:(NSUInteger)index ofType:(ATScriptStepType)type toIndex:(NSUInteger)newIndex;
- (NSArray *)scriptStepsOfType:(ATScriptStepType)type;

@end
